﻿@{
    ViewData["Title"] = await SystemConfig.GetByFieldNameAsync("SiteName");
    ViewData["UnitOfUse"] = await SystemConfig.GetByFieldNameAsync("UnitOfUse");
}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>@ViewData["Title"]</title>
    <link rel="stylesheet" href="~/lib/layui/css/layui.css">
    <link rel="stylesheet" href="~/admin/css/main.css">
    <style>
        html { zoom: 100%; width: 95%; margin: 5px auto; height: auto; }
        .cxuu-content-body { font-size: 16px; line-height: 30px; height: 30px; }
            .cxuu-content-body span { width: 80px; margin-left: 10px; }
        </style>
</head>
<body>
    <div class="layui-fluid">
        <!--startprint-->
        <h1 style="text-align:center;font-size: 26pt;height:50px;margin-top:20px; font-family:'SimHei',">@ViewData["UnitOfUse"]文件阅办卡</h1>

        <table style="border-collapse: collapse; width: 100%; height: 800px; border: 1px ridge rgb(0, 0, 0); margin-left: auto; margin-right: auto;" border="1">
            <colgroup>
                <col style="width: 10%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
                <col style="width: 11%;">
            </colgroup>
            <tbody>
                <tr style="height: 100px;">
                    <td style=" width: 120px; height: 100px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;">
                        <p><span style="font-size: 18pt; font-family: '黑体', sans-serif;">文件</span></p>
                        <p><span style="font-size: 18pt; font-family: '黑体', sans-serif;">名称</span></p>
                    </td>
                    <td style="height: 100px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 22pt;" colspan="11" id="title">&nbsp;</td>
                </tr>
                <tr style="height: 80px;">
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;">
                        <p><span style="font-size: 18pt; font-family: '黑体', sans-serif;">来文</span></p>
                        <p><span style="font-size: 18pt; font-family: '黑体', sans-serif;">单位</span></p>
                    </td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;" id="department">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">来文<br />文号</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;" id="docNumber">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">密级</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;" id="miji">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">收文<br />序号</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;" id="id">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">日期</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;" id="greattime">&nbsp;</td>
                </tr>
                <tr style="height: 260px;">
                    <td style="height: 260px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 18pt; font-family: '黑体', sans-serif;">领导<br />批示</span></td>
                    <td style="height: 260px; border-width: 1px; border-color: rgb(0, 0, 0);" colspan="11">&nbsp;</td>
                </tr>
                <tr style="height: 200px;">
                    <td style="height: 200px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 18pt; font-family: '黑体', sans-serif;">拟办<br />意见</span></td>
                    <td style="height: 200px; border-width: 1px; border-color: rgb(0, 0, 0);" colspan="11">&nbsp;</td>
                </tr>
                <tr style="height: 80px;">
                    <td rowspan=2 style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;">
                        <p><span style="font-size: 18pt; font-family: '黑体', sans-serif;">支队</span></p>
                        <p><span style="font-size: 18pt; font-family: '黑体', sans-serif;">部门</span></p>
                    </td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 16pt;" >综合</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">技术</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 16pt;">侦控</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">监控</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 16pt;">管理</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">特侦</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 16pt;">案件</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;">法制</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 16pt;"></span></td>
                </tr>
                <tr style="height: 80px;">
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;">&nbsp;</td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;font-size: 12pt;">&nbsp;</td>
                </tr>
                <tr style="height: 80px;">
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0); text-align: center;"><span style="font-size: 18pt; font-family: '黑体', sans-serif;">承办<br />结果</span></td>
                    <td style="height: 80px; border-width: 1px; border-color: rgb(0, 0, 0);" colspan="11" id="remarks">&nbsp;</td>
                </tr>
            </tbody>
        </table>
        <div class="layui-card">
            @* <div class="layui-card-header">文件内容</div>*@
            <div class="layui-card-body cxuu-content-body">
                <span>办理部门：</span><span id="groupname"></span> <span>经办人：</span> <span id="clercator"> </span> 
            </div>
        </div>
        <!--endprint-->
        <br />
        <br />
        <br />
        <br />
        <div style="text-align:center;">
            <input type="button" class="layui-btn" onclick="preview(1)" value="打印阅办卡">
        </div>
        <br />
        <br />
        <br />
        <br />
    </div>
 
    <script src="~/lib/layui/layui.js"></script>
    <script>
        layui.define(function () {
            var form = layui.form, layer = layui.layer, $ = layui.jquery, element = layui.element;
            var laydate = layui.laydate;

            $.getJSON("/Admin/Docreceived/AddOrEdit?id=@ViewBag.id&edit=1", function (res) {
                if (res.status == 1) {
                    var data = res.data;
                    var miji;

                    switch (data.miji) {
                        case 1:
                            miji = "秘密";
                            break;
                        case 2:
                            miji = "机密";
                            break;
                        case 3:
                            miji = "绝密";
                            break;
                        default:
                            miji = "无";
                    }

                    $("#id").html(data.id);
                    $("#title").html(data.title);
                    $("#docNumber").html(data.docNumber);
                    $("#greattime").html(data.greatTime);
                    $("#clercator").html(data.clercator);
                    $("#miji").html(miji);
                    $("#cateName").html(data.cateName);
                    $("#groupname").html(data.groupname);
                    $("#remarks").html(data.remarks);
                    $("#department").html(data.department);

                } else {

                }
            });

        });

        function preview(oper) {
            if (oper < 10) {
                bdhtml = window.document.body.innerHTML;
                // 打印开始的标志
                sprnstr = "<!--startprint-->";
                // 打印结束的标志
                eprnstr = "<!--endprint-->";
                // 从打印开始的位置截取到末尾
                prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
                // 从开始截取到打印结束的位置
                prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
                // 替换html
                window.document.body.innerHTML = prnhtml;
                // 打印
                window.print();
                window.document.body.innerHTML = bdhtml;
            } else {
                window.print();
            }
        }


    </script>

</body>
</html>